package org.itboys.product.dto;

import org.apache.commons.lang.StringUtils;
import org.itboys.commons.utils.string.SelfStringUtils;
import org.itboys.product.entity.ReceiveAddress;

import com.thoughtworks.xstream.converters.reflection.SelfStreamingInstanceChecker;

/**
 * Created by DELL on 2016/7/4.
 */
public class ReceiveAddressDTO {

    private Long id;
    private Long memberId;//用户Id
    private String name;//名称
    private String mobile;//手机
    private Long provinceId;//省id
    private Long cityId;//市id
    private Long districtId;//区县id
    private String address;//地址
    private String cityDetail; //省市区中文
    private Integer isDeleted;//0表示未删除，1表示已删除，2表示为默认地址
    private Integer isChoosen=0;
    public ReceiveAddressDTO() {
    }

    public ReceiveAddressDTO(Long id, Long memberId, String name, String mobile, Long provinceId, Long cityId, Long districtId, String address, String cityDetail, Integer isDeleted) {
        this.id = id;
        this.memberId = memberId;
        this.name = name;
        this.mobile = mobile;
        this.provinceId = provinceId;
        this.cityId = cityId;
        this.districtId = districtId;
        this.address = address;
        this.cityDetail = cityDetail;
        this.isDeleted = isDeleted;
    }
    public ReceiveAddressDTO(ReceiveAddress address) {
        this.id = address.getId();
        this.memberId = address.getMemberId();
        this.name = address.getName();
        this.mobile = SelfStringUtils.mixMobile(address.getMobile());
        this.provinceId = address.getProvinceId();
        this.cityId = address.getCityId();
        this.districtId = address.getDistrictId();
        this.address =address.getAddress() ;
        this.cityDetail = address.getCityDetail();
        this.isDeleted = address.getIsDeleted();
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public Long getDistrictId() {
        return districtId;
    }

    public void setDistrictId(Long districtId) {
        this.districtId = districtId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCityDetail() {
        return cityDetail;
    }

    public void setCityDetail(String cityDetail) {
        this.cityDetail = cityDetail;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

	public Integer getIsChoosen() {
		return isChoosen;
	}

	public void setIsChoosen(Integer isChoosen) {
		this.isChoosen = isChoosen;
	}
}
